<!DOCTYPE html>
<html th:replace="layout/layout"
      xmlns:th="http://www.thymeleaf.org">
<style th:fragment="styles">
</style>
<div th:fragment="content" id="customModule">
    <input id="type" type="hidden" th:value="${type}"/>
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-lg-10">
            <h2>无害化申报</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="/index?menuId=1">首页</a>
                </li>
                <li>
                    <a>无害化处理</a>
                </li>
                <li class="active">
                    <strong>无害化申报</strong>
                </li>
            </ol>
        </div>
        <div class="col-lg-2">

        </div>
    </div>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox ">
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <input type="text" id="declareTimeCondition" name="declareTimeCondition" placeholder="申报日期" autocomplete="off" class="form-control">
                                </div>
                            </div>
                            <div class="col-lg-3">
                                <div class="form-group">
                                    <select id='statusCondition' name='statusCondition' class="form-control" v-model="statusCondition">
                                        <option value="-1">处理状态</option>
                                        <option value="0">待上报</option>
                                        <option value="1">待运输</option>
                                        <option value="2">待处理</option>
                                        <option value="3">已处理</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <button type="submit" class="btn btn-primary  btn-rounded  btn-sm" id="search" @click="search()"><i
                                        class="fa fa-search"></i>&nbsp;搜索</button>
                                <button type="submit" class="btn btn-warning  btn-rounded  btn-sm" id="refresh" @click="reset()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置</button>
                            </div>
                        </div>

                        <div class="jqGrid_wrapper">
                            <div class="btn-group-sm" id="toolbar" role="group">
                                <a @click="addRecord();" class="btn btn-success" data-toggle="modal" v-if="isAdd"
                                >
                                    <i class="fa fa-plus"></i>申报
                                </a>
                                <!--<a class="btn btn-primary single disabled">-->
                                <!--<i class="fa fa-edit"></i> 修改-->
                                <!--</a>-->
                                <!--<a class="btn btn-danger multiple disabled">-->
                                <!--<i class="fa fa-remove"></i> 删除-->
                                <!--</a>-->
                            </div>

                            <table class="table table-striped table-bordered table-hover " id="tableList" >
                            </table>


                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--模态框-->
    <div class="modal inmodal" id="myModalAdd" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">无害化申报</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->

                    <div class="tabs-container">

                        <form class="form-horizontal" id="myform">
                            <div class="panel-body form-horizontal">

                                <div class="row">
                                    <label class="col-lg-2 control-label"><font style="color: red">*</font>批次号：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select id="batch" name="batch" v-model="batch" autocomplete="off" class="form-control">
                                                <option value="">--请选择批次号--</option>
                                                <option v-for="(item,index) in batchList" :value="item.id">{{item.batchNumber}}</option>
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">种公畜：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="species" name="species" v-model="species" placeholder="种公畜" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">后备母畜：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="reserve" name="reserve" v-model="reserve" placeholder="后备母畜" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">能繁母畜：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="menstruation" name="menstruation" v-model="menstruation" placeholder="能繁母畜" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">哺乳牲畜：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="lactation" name="lactation" v-model="lactation" placeholder="哺乳牲畜" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">保育牲畜：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="conservation" name="conservation" v-model="conservation" placeholder="保育牲畜" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">育成牲畜：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="commodity" name="commodity" v-model="commodity" placeholder="育成牲畜" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">动物照片：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <img onclick="$('#uploadImages').click()" id="showImage" src=""
                                                 style="display: none" class="img-responsive">
                                            <input accept=".png,.jpg" type="file" onchange="ImportImages()"
                                                   id="uploadImages" name="uploadImages" autocomplete="off"
                                                   class="form-control">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button type="button" id="save" name="save" class="btn btn-success" @click="saveRecord();"><i class="fa fa-save"></i>&nbsp;申报</button>
                    <button type="button" id="close" name="close" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-close"></i>&nbsp;关 闭</button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal inmodal" id="myModalAdd2" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">无害化申报</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->

                    <div class="tabs-container">

                        <form class="form-horizontal" id="myform2">
                            <div class="panel-body form-horizontal">

                                <div class="row">
                                    <label class="col-lg-2 control-label">病死畜禽数量：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input type="number" id="livestock" name="livestock" v-model="livestock" placeholder="病死畜禽数量" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">动物照片：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <img id="showImage2" src=""
                                                 style="display: none" class="img-responsive">
                                            <input accept=".png,.jpg" type="file" onchange="ImportImages2()"
                                                   id="uploadImages2" name="uploadImages2" autocomplete="off"
                                                   class="form-control">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--模态框body结束-->
                </div>
                <div class="modal-footer">
                    <button type="button" id="save2" name="save" class="btn btn-success" @click="saveRecord();"><i class="fa fa-save"></i>&nbsp;申报</button>
                    <button type="button" id="close2" name="close" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-close"></i>&nbsp;关 闭</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 查看详情 -->
    <div class="modal inmodal" id="myModalAdd1" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content animated bounceInRight">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">无害化处理详情</h4>
                </div>
                <div class="modal-body">
                    <!--@*模态框body*@-->

                    <div class="tabs-container">

                        <form class="form-horizontal" id="myform1">
                            <div class="panel-body form-horizontal">

                                <div class="row">
                                    <label class="col-lg-2 control-label">申报人：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="suserName" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">申报日期：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="declareTime" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">病死畜禽种类：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="animal" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">病死畜禽数量：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="dead" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">病死畜禽照片：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <img :src="declareImage" class="img-responsive">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">上报人：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="user" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">上报日期：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="createTime" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">死亡原因：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="cause" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">处理途径：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select disabled v-model="dhannel" autocomplete="off" class="form-control">
                                                <option value="0">自行处理</option>
                                                <option value="1">集中处理</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">承运人：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="driver" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">运输日期：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="transportationTime" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">承运车牌号：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="car" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">承运人电话：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="phone" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">处理方式：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <select disabled v-model="method" autocomplete="off" class="form-control">
                                                <option value="0">焚烧</option>
                                                <option value="1">深埋</option>
                                                <option value="2">化制</option>
                                                <option value="3">集中无害化处理</option>
                                            </select>
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">负责处理人员：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="person" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-lg-2 control-label">处理时间：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <input readonly type="text" v-model="processingTime" autocomplete="off" class="form-control">
                                        </div>
                                    </div>
                                    <label class="col-lg-2 control-label">处理图片：</label>
                                    <div class="col-lg-4">
                                        <div class="form-group">
                                            <img :src="img" class="img-responsive">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!--模态框body结束-->
                </div>
            </div>
        </div>
    </div>
</div>
<div th:fragment="scriptRef">
    <script th:src="@{/js/lib/inspinia/js/plugins/laydate/laydate.js}"></script>
    <script th:src="@{/js/harmless/harmlessReport.js}"></script>
    <!--表单验证-->
    <script th:src="@{/js/lib/validate/jquery.validate.min.js}"></script>
    <!-- 文件上传 -->
    <script th:src="@{/js/Scripts/ajaxfileupload.js}"></script>
</div>
<script th:fragment="scripts" type="text/javascript">
    HarmlessReport.init();
</script>
</html>